<?php

namespace App\Http\Controllers\Applet\Other;

use App\Services\Applet\Other\SettingService;
use Exception;
use Symfony\Component\HttpFoundation\JsonResponse;

class SettingController extends BaseOtherController
{

    protected SettingService $settingService;

    /**
     * @throws Exception
     */
    public function __construct()
    {
        parent::__construct();
        $this->settingService = loadService('Applet\Other\SettingService');
    }


    /**
     * 认养模块开关
     *
     * @return JsonResponse
     * @throws Exception
     */
    public function sponsorSwitch(): JsonResponse
    {
        $data = $this->settingService->sponsorSwitch();
        return outputJsonResult($data);
    }

}
